<%-- 
    Document   : chitietsanphamcontent
    Created on : Sep 30, 2011, 10:47:40 AM
    Author     : Administrator
--%>

<%@page import="java.util.Date"%>
<%@page import="hibernate.pojo.Sanpham"%>
<%@page import="org.hibernate.HibernateException"%>
<%@page import="hibernate.pojo.Chitietsanpham"%>
<%@page import="java.text.DecimalFormat" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Zing Deal | Chi tiết sản phẩm</title>
        <link href="DealZing_files/6aad5646.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
        <%
            try 
            {
                DecimalFormat df = new DecimalFormat("###,###");
                Chitietsanpham ctsanpham = (Chitietsanpham) request.getAttribute("ChiTietSanPham");
                Sanpham sanpham = ctsanpham.getSanpham();
                String linkbuy = "";
                String thoigianconlai = null;
                if (ctsanpham != null) 
                {
                    String state = (String) request.getAttribute("TrangThaiSanPham");
                    if (state.equals("BuyDeal JsNoChildrenDeal")) // Trạng thái opening
                    {
                        linkbuy = "cartcontroller?action=buy&amp;maSanPham=" + sanpham.getMaSanPham();
                        thoigianconlai = "<div class='Time'>" +
                                            "<p>Thời gian còn lại :</p>" +
                                            "<div class='js-deal-end-countdown'>&nbsp;</div>" +
                                                "<span class='js-time hide'>"+sanpham.getNgayHetHanKhuyenMai()+"</span>" +
                                         "</div>";
                    } 
                    else if (state.equals("BuyDeal pointerClose DealClose")) // Trạng thái close
                    {
                        linkbuy = "#";
                        thoigianconlai = "<div class='Time'>" +
                                            "<div style='padding:11px 0 0 0;font-weight:700;font-size:14px;'>Lỡ cơ hội rồi</div>" +
                                         "</div>";
                    }
        %>            
        <div class="BoxDealHot">
            <div class="BoxDealHotTop">
                <div class="BoxDealHotBottom">
                    <h2><a href=""></a><%=sanpham.getTieuDeSanPham()%></h2>
                    <div class="Des">
                        <div class="BoxLeft1">
                            <a href="" title="<%=sanpham.getTieuDeSanPham()%>" class="Left">
                                <img src="<%=sanpham.getAnhDaiDien()%>" class="" alt="[Hình:<%=sanpham.getTieuDeSanPham()%>]" title="Click để xem chi tiết" width="450" height="276" />
                            </a>					
                            <div class="BoxEdit" >
                                <strong class="TextEdit">
                                    <a href="commentcontroller?action=newcomment&amp;maSanPham=<%=sanpham.getMaSanPham()%>">Tham gia thảo luận</a></strong>
                                <span class="TextEdit1"> | 105 thảo luận</span>
                            </div>                
                        </div>
                        <div class="BoxLeft2">
                            <div class="Price">
                                <div class="PriceTop">
                                    <div class="PriceBot">
                                        <ul class="Coup">
                                            <li>
                                                <ul>
                                                    <li>
                                                        <p>Trị giá</p>
                                                        <p class="TextCoup"><span class="c cr" title=""><%=df.format(sanpham.getTriGia())%></span><sup class="TextDv">đ</sup></p>
                                                    </li>
                                                    <li class="Last">
                                                        <p>Tiết kiệm </p>
                                                        <p class="TextSave"><span class="c cr" title=""><%=df.format(sanpham.getGiaBan())%></span><sup class="TextDv">đ</sup></p>
                                                    </li>
                                                </ul>
                                            </li>
                                            <li>
                                                <a href="cartcontroller?action=present&amp;maSanPham=<%=sanpham.getMaSanPham()%>" class="JsDealBuyGift JsNoChildrenDeal"><img src="DealZing_files/qua00000.jpg" height="26" width="22" class="Left" alt="" /><strong class="TextFriend">Mua tặng bạn bè!</strong></a><span class="JsDealId">668</span>
                                            </li>
                                            <li class="Last"><img src="DealZing_files/check000.jpg" height="25" width="25" class="Left" alt="" /><span class="TextFriend"><strong class="Textnum JsQuantityDealUserCount"></strong> lượt mua</span></li>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                            <div class="Price">
                                <div class="PriceTop">
                                    <div class="PriceBot">
                                        <div class="TimeBuy">
                                            <img src="DealZing_files/donghoca.jpg" height="35" width="19" class="Dongho" alt="" />
                                                <%=thoigianconlai%>
                                        </div>
                                        <ul class="Share">
                                            <li >Chia sẻ: </li>
                                            <li><a href="" onclick="window.open('http://link.apps.zing.vn/pro/view/conn/share?fl=&amp;u=http://deal.zing.vn/deal/tung-bung-khai-truong-chi-nhanh-hat-gao-vang-thoa-thich-an-uong-chi-30000d&amp;t=Tưng bừng khai trương chi nhánh nhà hàng Hạt Gạo Vàng, thỏa thích ăn uống chỉ với 30.000Đ có trọn bộ thực đơn: bánh cuốn các loại, sinh tố giải khát, nem chua, khăn lạnh. (khai trương ngày 25.09.2011)', '', 'width=500,height=500');">
                                                    <img src="DealZing_files/zing0000.jpg" width="15" height="15" alt="Zing Me" class="Left" />&nbsp;<strong >Zing Me</strong></a></li>	                                
                                            <li class="Last"><a href="" onclick="window.open('http://www.facebook.com/sharer.php?u=http://deal.zing.vn/deal/tung-bung-khai-truong-chi-nhanh-hat-gao-vang-thoa-thich-an-uong-chi-30000d', '', 'width=500,height=500');"><img src="DealZing_files/facebook.png" width="16" height="16" alt="Facebook" class="Left" /></a></li>
                                            <li><a href="http://www.twitter.com/home?status=Tung+bung+khai+truong+chi+nhanh+Hat+Gao+Vang%2C+thoa+thich+an+uong+chi+30.000D+-+http://bit.ly/q9wxVp" target="blank" title="Twitter" class="tweet"><img src="DealZing_files/twitter0.gif" alt="" /></a></li>
                                            <li><a href="mailto:?body=Xem%20nhung%20deal%20hap%20dan%20tai%20Zing%20Deal%20-%20http://deal.zing.vn/deal/tung-bung-khai-truong-chi-nhanh-hat-gao-vang-thoa-thich-an-uong-chi-30000d&amp;subject=Co%20hang%20tot%20tai%20Zing%20Deal:%20giam%20gia%20%2050%20tai" target="_blank"><img src="DealZing_files/mail0000.jpg" width="20" height="15" alt="Mail" class="Left" />&nbsp;</a></li>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="MuaDeal">
                            <div class="GiaTot">
                                <p><strong>Giá bán</strong></p>
                                <p><strong class="TextBuy"><span class="c cr" title=""><%=df.format(sanpham.getGiaBan())%></span></strong><span class="GiaDv">đ</span></p>
                            </div>
                            <a href="<%=linkbuy%>" title="Mua" class="<%=state%>">Mua</a><span class="JsDealId">668</span>
                        </div>
                    </div>            
                    <div class="BoxIntro">
                        <div class="BoxNoibat">
                            <h3>Điểm nổi bật</h3>
                            <div>
                                <!-- Chèn điểm nổi bật vào đây -->
                                <%=ctsanpham.getDiemNoiBat()%>
                                <!-- Kết thúc chèn điểm nổi bật -->
                            </div>                        
                        </div>
                        <div class="BoxDK">
                            <h3>Điều kiện áp dụng</h3>
                            <!-- Chèn Điều kiện áp dụng vào đây -->
                            <%=ctsanpham.getDieuKienApDung()%>
                            <!-- Kết thúc Điều kiện áp dụng -->
                        </div>
                    </div>
                </div>
            </div>
        </div>                    
        <div class="Inf">
            <div class="InfTop">
                <div class="InfBottom">
                    <div class="InfDetail">
                        <h3>Thông tin chi tiết</h3>
                        <%=ctsanpham.getThongTinChiTiet()%>
                        <p class="TextCenter"><a href="http://deal.zing.vn/tp-ho-chi-minh/page/payment"><img class="BorderImg" src="DealZing_files/banner_g.jpg" alt="" width="470" /></a></p>
                        <div class="NoticeAll">
                            <p class="NoteLegend">Lưu &yacute;</p>
                            <div class="NoteContent">
                                <p>K&ecirc;nh thanh to&aacute;n trực tuyến: <a href="http://deal.zing.vn/tp-ho-chi-minh/page/payment">Zing Xu</a>, <a href="http://deal.zing.vn/tp-ho-chi-minh/page/payment">Thẻ Zing</a>, <a href="http://deal.zing.vn/tp-ho-chi-minh/page/payment">Internetbanking</a></p>
                                <p>Hoặc gọi về số: 1900 561 558 để được tư vấn th&ecirc;m</p>
                            </div>
                        </div>
                        <p class="TextCenter"><img class="BorderImg" src="DealZing_files/banner_t.jpg" alt="" width="470" /></p>
                        <ul class="Share" style="float:right;">
                            <li >Chia sẻ: </li>
                            <li><a href="" onclick="window.open('http://link.apps.zing.vn/pro/view/conn/share?fl=&amp;u=http://deal.zing.vn/deal/tung-bung-khai-truong-chi-nhanh-hat-gao-vang-thoa-thich-an-uong-chi-30000d&amp;t=Tưng bừng khai trương chi nhánh nhà hàng Hạt Gạo Vàng, thỏa thích ăn uống chỉ với 30.000Đ có trọn bộ thực đơn: bánh cuốn các loại, sinh tố giải khát, nem chua, khăn lạnh. (khai trương ngày 25.09.2011)', '', 'width=500,height=500')"');">
                                   <img src="DealZing_files/zing0000.jpg" width="15" height="15" alt="Zing Me" class="Left" />&nbsp;<strong >Zing Me</strong></a></li>	                                
                            <li class="Last"><a href="" onclick="window.open('http://www.facebook.com/sharer.php?u=http://deal.zing.vn/deal/tung-bung-khai-truong-chi-nhanh-hat-gao-vang-thoa-thich-an-uong-chi-30000d', '', 'width=500,height=500');"><img src="DealZing_files/facebook.png" width="16" height="16" alt="Facebook" class="Left" /></a></li>
                            <li>&nbsp;&nbsp;<g:plusone size="small" count="false"></g:plusone></li>
                            <li><a href="http://www.twitter.com/home?status=Tung+bung+khai+truong+chi+nhanh+Hat+Gao+Vang%2C+thoa+thich+an+uong+chi+30.000D+-+http://bit.ly/q9wxVp" target="blank" title="Twitter" class="tweet"><img src="DealZing_files/twitter0.gif" alt="" /></a></li>
                            <li><a href="mailto:?body=Xem%20nhung%20deal%20hap%20dan%20tai%20Zing%20Deal%20-%20http://deal.zing.vn/deal/tung-bung-khai-truong-chi-nhanh-hat-gao-vang-thoa-thich-an-uong-chi-30000d&amp;subject=Co%20hang%20tot%20tai%20Zing%20Deal:%20giam%20gia%20%2050%20tai" target="_blank"><img src="DealZing_files/mail0000.jpg" width="20" height="15" alt="Mail" class="Left" />&nbsp;</a></li>
                        </ul>
                    </div>
                    <div class="BoxMap">
                        <h4><span class="c"><%=ctsanpham.getTenCongTy()%></span></h4>
                        <p><a href="<%=ctsanpham.getWebsiteCongTy()%>" title="<%=ctsanpham.getTenCongTy()%>" target="_blank"><font color="#009DDC">Ghé thăm Website</font></a></p>
                        <p><span class="c"><%=ctsanpham.getDiaChiCongTy()%></span></p>
                        <div class="map-block">
                            <a href="<%=ctsanpham.getDiaChiGoogleMap()%>" title="<%=ctsanpham.getTenCongTy()%>" target="_blank">
                                <img src="http://maps.google.com/maps/api/staticmap?center=10.788286,106.662163&amp;zoom=16&amp;size=180x250&amp;markers=color:pink|label:M|10.788286,106.662163&amp;sensor=false" alt="" />
                            </a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <%
                }
            } catch (HibernateException ex) {
                out.println(ex);
            }
        %>
    </body>
</html>    